﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomeWork2_3
{
    class Program
    {
        static void removeMultiples(ref int[] array, int i)
        {
            for (int j = 0; j < array.Length; j++)
            {
                if (array[j] > i && array[j] % i == 0)
                    array[j] = 0;
            }
        }
        static void Main(string[] args)
        {
            int[] prime = new int[99];
            for (int i = 2; i <= 100; i++)
            {
                prime[i - 2] = i;
            }
            for (int j = 2; j <= 10; j++)
                removeMultiples(ref prime, j);
            for (int k = 0; k < prime.Length; k++)
            {
                if (prime[k] != 0)
                {
                    Console.WriteLine(Convert.ToString(prime[k]));
                }
            }
        }
    }
}
